#include "dict.h"
#include "attrib.h"
#include "list.h"

#ifndef PKG_H
#define PKG_H

typedef dict_p pkg_p;

pkg_p pkg_new();
void pkg_free(pkg_p pkg);

void pkg_set(pkg_p pkg, char *key, char *value);
char *pkg_get(pkg_p pkg, char *key);

int pkg_has(pkg_p pkg, char *key, char *file);

void pkg_add(pkg_p pkg, char *key, char *value);
list_p pkg_get_all(pkg_p pkg, char *key);

void pkg_set_name(pkg_p pkg, char *name);
char *pkg_get_name(pkg_p pkg);

void pkg_set_version(pkg_p pkg, char *version);
char *pkg_get_version(pkg_p pkg);

void pkg_set_release(pkg_p pkg, char *release);
char *pkg_get_release(pkg_p pkg);

void pkg_add_file(pkg_p pkg, char *file);
list_p pkg_get_files(pkg_p pkg);
int pkg_has_file(pkg_p, char *file);

#endif /* PKG_H */
